//
//  YZQButtonCollectionViewCell.m
//  A_project2.0
//
//  Created by apple on 16/3/15.
//  Copyright © 2016年 七平. All rights reserved.
//

#import "YZQButtonCollectionViewCell.h"
#define WIDTH [UIScreen mainScreen].bounds.size.width
#define HEIGHT [UIScreen mainScreen].bounds.size.height

@implementation YZQButtonCollectionViewCell
- (instancetype) initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _imgView = [[UIImageView alloc] init];
        [self.contentView addSubview:_imgView];
        
        _cnname = [[UILabel alloc] init];
        [self.contentView addSubview:_cnname];
        
        _enname = [[UILabel alloc] init];
        
        [self.contentView addSubview:_enname];
        
        _beenstrLabel = [[UILabel alloc] init];
        
        [self.contentView addSubview:_beenstrLabel];
        
        _representativeLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_representativeLabel];
        
        _hengxianView = [[UIView alloc] init];
        [self.contentView addSubview:_hengxianView];
    }
    return self;
    
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    
    _imgView.frame = CGRectMake(0, 0, layoutAttributes.size.width, layoutAttributes.size.height - 80);
    _cnname.frame = CGRectMake(55, 30, 60, 20);
    _enname.frame = CGRectMake(55, 45, 80, 20);
    _beenstrLabel.frame = CGRectMake(10, layoutAttributes.size.height - 70, 100, 20);
    _representativeLabel.frame = CGRectMake(10, layoutAttributes.size.height - 40, layoutAttributes.size.width - 2, 38);
    _hengxianView.frame = CGRectMake(0, layoutAttributes.size.height - 1, self.contentView.frame.size.width, 0.5);
    _hengxianView.backgroundColor = [UIColor colorWithRed:236 / 255.0 green:236 / 255.0 blue:236 / 255.0 alpha:1];
    
}

@end
